package org.ala.shopping_test.shopping_center.repository.category.entity;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;


/**
 *	Entity (shopping_category)
 *  品类表
 *
 *	@author 骆毅 (ala)
 *	@date 2025-03-17 11:51:36
 */
@ApiModel("shopping_category")
public class ShoppingCategoryDO implements Serializable {
    /**
     *
     */
    private static final long serialVersionUID = 1L;

    /**
     *  品类id
     */
    @ApiModelProperty("品类id")
    protected Long id;
    /**
     *  上级品类id
     */
    @ApiModelProperty("上级品类id")
    protected Long parentId;
    /**
     *  品类名称
     */
    @ApiModelProperty("品类名称")
    protected String categoryName;
    /**
     *  上级品类编码-品类名首字母缩写
     */
    @ApiModelProperty("上级品类编码-品类名首字母缩写")
    protected String code;
    /**
     *  记录创建时间
     */
    @ApiModelProperty("记录创建时间")
    protected java.sql.Timestamp createTime;
    /**
     *  记录最后修改时间
     */
    @ApiModelProperty("记录最后修改时间")
    protected java.sql.Timestamp modifyTime;


    public static ShoppingCategoryDO build() {return new ShoppingCategoryDO();}


    public Long getId() {return id;}
    public void setId(Long id) { this.id = id; }
    public ShoppingCategoryDO id(Long id) { this.id = id; return this; }

    public Long getParentId() {return parentId;}
    public void setParentId(Long parentId) { this.parentId = parentId; }
    public ShoppingCategoryDO parentId(Long parentId) { this.parentId = parentId; return this; }

    public String getCategoryName() {return categoryName;}
    public void setCategoryName(String categoryName) { this.categoryName = categoryName; }
    public ShoppingCategoryDO categoryName(String categoryName) { this.categoryName = categoryName; return this; }

    public String getCode() {return code;}
    public void setCode(String code) { this.code = code; }
    public ShoppingCategoryDO code(String code) { this.code = code; return this; }

    public java.sql.Timestamp getCreateTime() {return createTime;}
    public void setCreateTime(java.sql.Timestamp createTime) { this.createTime = createTime; }
    public ShoppingCategoryDO createTime(java.sql.Timestamp createTime) { this.createTime = createTime; return this; }

    public java.sql.Timestamp getModifyTime() {return modifyTime;}
    public void setModifyTime(java.sql.Timestamp modifyTime) { this.modifyTime = modifyTime; }
    public ShoppingCategoryDO modifyTime(java.sql.Timestamp modifyTime) { this.modifyTime = modifyTime; return this; }


    /**
     *  是否为空
     *  <p> 仅仅是每个字段的为空检测。若存在特殊空判，需要自行实现
     */
    public boolean isEmpty() {
        if (this.id != null) {return false;}
        if (this.parentId != null) {return false;}
        if (this.categoryName != null) {return false;}
        if (this.code != null) {return false;}
        if (this.createTime != null) {return false;}
        if (this.modifyTime != null) {return false;}
        return true;
    }
    /**
     *  copy（注：这是浅拷贝）
     */
    public ShoppingCategoryDO copy() {
        ShoppingCategoryDO copy = new ShoppingCategoryDO();
        copy.id = this.id;
        copy.parentId = this.parentId;
        copy.categoryName = this.categoryName;
        copy.code = this.code;
        copy.createTime = this.createTime;
        copy.modifyTime = this.modifyTime;
        return copy;
    }
}
